<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <OutputType>Exe</OutputType>
    <AssemblyName>qcat</AssemblyName>
    <Authors>Ivan Kozhin</Authors>
    <Product>QueryCat</Product>
    <Copyright>Copyright (c) 2023</Copyright>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <DefineConstants>TRACE;ENABLE_PLUGINS;PLUGIN_THRIFT</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DefineConstants>TRACE;ENABLE_PLUGINS;PLUGIN_THRIFT</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
    <PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
    <PackageReference Update="StyleCop.Analyzers.Unstable" Version="1.2.0.556">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\QueryCat.Backend\QueryCat.Backend.csproj" />
    <ProjectReference Include="..\QueryCat.Backend.Addons\QueryCat.Backend.Addons.csproj" />
    <ProjectReference Include="..\QueryCat.Backend.ThriftPlugins\QueryCat.Backend.ThriftPlugins.csproj" />
    <ProjectReference Condition="$(DefineConstants.Contains('PLUGIN_ASSEMBLY'))" Include="..\QueryCat.Backend.AssemblyPlugins\QueryCat.Backend.AssemblyPlugins.csproj" />
    <EmbeddedResource Include="Infrastructure\WebServerIndex.html" />
    <EmbeddedResource Include="Infrastructure\WebServerPage.js" />
    <EmbeddedResource Update="Resources\Messages.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Messages.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <EmbeddedResource Update="Resources\Errors.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Errors.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>

  <ItemGroup>
    <Compile Update="Resources\Messages.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Messages.resx</DependentUpon>
    </Compile>
    <Compile Update="Resources\Errors.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Errors.resx</DependentUpon>
    </Compile>
  </ItemGroup>

</Project>
